import { object_Inf } from "@/utils/typings/index.type";
import i18n from "@/international/i18n";

/*
 * @Descripttion:
 * @LastEditors: xzh
 * @LastEditTime: 2023-10-18 11:24:30
 */
export default class Utils_Base {
  /**
   * @Author: xzh
   * @Descripttion: i18n实例
   * @Param:
   */
  static t = i18n().global.t;
  /**
   * @Author: xzh
   * @Descripttion:表格列映射
   * @Param:
   */
  static tableColumnMap: object_Inf = {
    //异常信息列表
    abnormalInfo: [
      {
        field: "abnormal",
        //t('page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.abnormal')
        title:
          "page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.abnormal",
      },
      {
        field: "warningTime",
        //t('page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.warningTime')
        title:
          "page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.warningTime",
      },
      // {
      //   field: "warnType",
      //   //t('page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.warnType')
      //   title:
      //     "page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.warnType",
      //   width: 80,
      // },
    ],
    // 故障分布列表
    faultSpread: [
      {
        field: "faultType",
        //t('page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.faultType')
        title:
          "page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.faultType",
      },
      {
        field: "faultNum",
        //t('page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.faultNum')
        title:
          "page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.faultNum",
        width: 80,
      },
      {
        field: "handleNum",
        //t('page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.handleNum')
        title:
          "page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.handleNum",
        width: 100,
      },
    ],
    //模具状态
    moldState: [
      {
        field: "moldState",
        //t('page.moldManageArr.moldState')
        title: "page.moldManageArr.moldState",
      },
      {
        field: "moldNum",
        //t('page.dashboardManageArr.afterSaleDashboardArr.moldStateArr.moldNum')
        title:
          "page.dashboardManageArr.afterSaleDashboardArr.moldStateArr.moldNum",
      },
      {
        field: "proportion",
        //t('page.dashboardManageArr.afterSaleDashboardArr.moldStateArr.proportion')
        title:
          "page.dashboardManageArr.afterSaleDashboardArr.moldStateArr.proportion",
      },
    ],
    //模具故障
    moldFault: [
      {
        field: "faultType",
        //t('page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.faultType')
        title:
          "page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.faultType",
      },
      {
        field: "faultNum",
        //t('page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.faultNum')
        title:
          "page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.faultNum",
      },
      {
        field: "handleNum",
        //t('page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.handleNum')
        title:
          "page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.handleNum",
      },
    ],
    // 模具报警
    moldWarning: [
      {
        field: "abnormal",
        //t('page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.abnormal')
        title:
          "page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.abnormal",
      },
      {
        field: "warnType",
        //t('page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.warnType')
        title:
          "page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.warnType",
        width: 80,
      },
      {
        field: "warningTime",
        //t('page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.warningTime')
        title:
          "page.dashboardManageArr.afterSaleDashboardArr.equipStateArr.warningTime",
        width: 150,
      },
    ],
  };
}
